(function($){
    $.jQueryAjax = new function(){
        this.ajax = function(href, data)    
        {      
                    
            $.ajax({
                url: 'http://192.168.4.108/sohagame/'+ href, 
                cache: false, 
                data: data,
                dataType: 'jsonp', 
                contentType: "application/json; charset=utf-8", 
                beforeSend: function() { if(typeof data.error != 'undefined') $("div#jq_update").html("<center> <img border=\"0\" src=\"http://192.168.4.108/sohagame/webskins/images/ajax-loader.gif\" /> </center> <br />"); }, 
                timeout: 5000, 
                error: function(request, error){ alert(error); },  
                success: function(data){ if(data.error){ alert(data.error); if(data.back) history.go(-1); } else if (data.redirect) window.location.href = data.redirect; else $('div#jq_update').html(data.html); }
            }); 
            return false;  
        };
    };
});